package com.md.api;

import com.md.model.system.CommonResult;
import com.md.request.AzureSamlLoginRequest;
import com.md.request.LoginRequest;
import com.md.response.LoginResponse;
import com.md.value.constants.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Api(tags = {ApiConstants.LOGIN_CENTER})
public interface LoginApi {
  String PATH_PREFIX = "/login-center";

  /**
   * 微软授权登录-saml
   *
   * @param request 登录请求
   * @return 操作结果
   */
  @PostMapping(PATH_PREFIX + "/azure/saml")
  @ApiOperation("微软授权登录-saml")
  CommonResult<Void> azureSaml(@RequestBody AzureSamlLoginRequest request);

  /**
   * 登陆
   *
   * @param request 登录请求
   * @return 操作结果
   */
  @PostMapping(PATH_PREFIX + "/login")
  @ApiOperation("登陆")
  CommonResult<LoginResponse> login(@RequestBody LoginRequest request);
}
